<template>
  <span
    class="ui-radio"
    @click="$emit('input', label)">
    <span class="ui-icon" :class="label === value ? 'ui-icon__xz' : 'ui-icon__wx'"></span>
    <span :style="{color: label === value ? '#2cadff' : '#313133'}" class="ui-radio__text"><slot/></span>
  </span>
</template>

<script>
  export default {
    name: 'GzhbRadio',
    props: {
      value: String,
      label: String
    }
  }
</script>

<style lang="less" scoped>
.ui-radio {
  display: block;
  width: 100%;
  padding: 0 20px;
  .ui-icon {
    font-size: 3.75vw;
    margin-right: 6px;
  }
}
.ui-radio__text {
  font-size: 3.43vw;
}
</style>